library MarineStop initializer init requires LegacySystem

	private function CC takes nothing returns boolean
		if GetIssuedOrderId() == ORDER.avatar and GetUnitAbilityLevel(GetTriggerUnit(), 'A08U' ) > 0 then
			call IssueImmediateOrderById(GetTriggerUnit(), ORDER.holdposition)
			call PerserveInvisibleOnSpellAction(GetTriggerUnit())
		endif
		return false
	endfunction

	private function init takes nothing returns nothing
		local trigger t
		set t = CreateTrigger()
		call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_ISSUED_ORDER  )
		call TriggerAddCondition(t,Condition(function CC))
		set t = null
	endfunction

endlibrary